package com.joinlabs.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.joinlabs.entity.Address;

public interface AddressMapper {
	/**
	 * 	删除收货地址
	 * @param zyAid 地址Id
	 * @return
	 */
    int deleteByPrimaryKey(Long zyAid);
    
    /**
     * 	添加收货地址
     * @param record
     * @return
     */
    int insert(Address address);

    int insertSelective(Address address);

    Address selectByPrimaryKey(Long zyAid);
    
    List<Address> selectByUser(String userId);

    int updateByPrimaryKeySelective(Address address);
    
    /**
     * 	更新收货地址
     * @param address
     * @return
     */
    int updateByPrimaryKey(Address address);
    
    /**
   	 * 	查询收获地址
   	 * @param userId	用户Id
   	 * @return
   	 */
    List<Address> selectAddressByUserId(@Param("userId") String userId);

}